from fastapi import FastAPI

from middleware import process_time_middleware, logger_middleware

app = FastAPI()

# 执行顺序，先声明的中间件后执行响应逻辑
process_time_middleware(app)
logger_middleware(app)


@app.get("/hello")
def read_root():
    return {"Hello": "World"}
